From 56903d7fa69e6a4203bff8f220777eee00636634 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 1 Apr 2004 09:22:54 +0000 Subject: [PATCH] bitkeeper revision 1.825.3.21 (406bdf6e4yUNbgx_RSShBfyJ0ZlFdA) system.h: Extra compiler barriers in upcall code. --- xenolinux-2.4.25-sparse/include/asm-xen/system.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xenolinux-2.4.25-sparse/include/asm-xen/system.h b/xenolinux-2.4.25-sparse/include/asm-xen/system.h index 86d6c7b150..40e11d3e68 100644 --- a/xenolinux-2.4.25-sparse/include/asm-xen/system.h +++ b/xenolinux-2.4.25-sparse/include/asm-xen/system.h @@ -321,6 +321,7 @@ do { \ shared_info_t *_shared = HYPERVISOR_shared_info; \ barrier(); \ _shared->vcpu_data[0].evtchn_upcall_mask = 0; \ + barrier(); /* unmask then check (avoid races) */ \ if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) ) \ evtchn_do_upcall(NULL); \ } while (0) @@ -334,9 +335,11 @@ do { \ do { \ shared_info_t *_shared = HYPERVISOR_shared_info; \ barrier(); \ - if ( (_shared->vcpu_data[0].evtchn_upcall_mask = x) == 0 ) \ + if ( (_shared->vcpu_data[0].evtchn_upcall_mask = x) == 0 ) { \ + barrier(); /* unmask then check (avoid races) */ \ if ( unlikely(_shared->vcpu_data[0].evtchn_upcall_pending) ) \ evtchn_do_upcall(NULL); \ + } \ } while (0) #define __save_and_cli(x) \ -- 2.30.2